package com.atguigu.jxc.service.impl;

import com.atguigu.jxc.dao.GoodsUnitDao;
import com.atguigu.jxc.entity.Unit;
import com.atguigu.jxc.service.GoodsUnitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * TODO
 *
 * @author Mr.zhao
 * @version 1.0
 * @date 2021/12/31 12:59
 */
@Service
public class GoodsUnitServiceImpl implements GoodsUnitService {

    @Autowired
    private GoodsUnitDao goodsUnitDao;

    @Override
    public Map<String, Object> getUnit() {
        List<Unit> list = goodsUnitDao.getUnitList();
        HashMap<String, Object> result = new HashMap<>();
        result.put("rows",list);
        return result;
    }
}
